<template>
  <div>
    <form action="/">
      <van-search
        v-model="value"
        show-action
        placeholder="请输入搜索关键词"
        @search="onSearch"
        @cancel="onCancel"
      />
    </form>
  </div>
</template>

<script>

export default {
  name: "MySearch",
  data() {
    return {
      value: "",
    };
  },
  created() {
    this.getwenzang();
  },
  methods: {
    onSearch(val) {
      Toast(val);
    },
    onCancel() {
      Toast("取消");
    },
    getwenzang() {
      this.$http
        .post("/api/get_article_detail",{
          article_id
        })
        .then((res) => {
          console.log(res.data);
        })
        .cath((rap) => {
          console.log(rap);
        });
    },
  },
};
</script>

<style scoped>
header {
  height: 50px;
  background: rgb(210, 155, 44);
}
</style>